﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FridgeManagerApp
{
    [DataContract]
    public class WStockNote : NotificationObject
    {
        private String stockUID;
        private int dominoTypeUID;
        private String dominoUID;
        private int officeUID;
        private int personnelUID;
        private float price;
        private String createTime;

        [DataMember(Order = 0)]
        public String StockUID
        {
            get
            {
                return stockUID;
            }
            set
            {
                stockUID = value;
                RaisePropertyChanged("StockUID");
            }
        }

        [DataMember(Order = 1)]
        public int DominoTypeUID
        {
            get
            {
                return dominoTypeUID;
            }
            set
            {
                dominoTypeUID = value;
                RaisePropertyChanged("DominoTypeUID");
            }
        }

        [DataMember(Order = 2)]
        public String DominoUID
        {
            get
            {
                return dominoUID;
            }
            set
            {
                dominoUID = value;
                RaisePropertyChanged("DominoUID");
            }
        }

        [DataMember(Order = 3)]
        public int OfficeUID
        {
            get
            {
                return officeUID;
            }
            set
            {
                officeUID = value;
                RaisePropertyChanged("OfficeUID");
            }
        }

        [DataMember(Order = 4)]
        public int PersonnelUID
        {
            get
            {
                return personnelUID;
            }
            set
            {
                personnelUID = value;
                RaisePropertyChanged("PersonnelUID");
            }
        }

        [DataMember(Order = 5)]
        public float Price
        {
            get
            {
                return price;
            }
            set
            {
                price = value;
                RaisePropertyChanged("Price");
            }
        }

        [DataMember(Order = 6)]
        public String CreateTime
        {
            get
            {
                return createTime;
            }
            set
            {
                createTime = value;
                RaisePropertyChanged("CreateTime");
            }
        }

        public WStockNote()
        {
            StockUID = "";
            DominoTypeUID = -1;
            DominoUID = "";
            OfficeUID = -1;
            PersonnelUID = -1;
            Price = -1;
            CreateTime = "";
    }

        public WStockNote(LStockNote p)
        {
            StockUID = p.StockUID;
            DominoTypeUID = p.DominoTypeUID;
            DominoUID = p.DominoUID;
            OfficeUID = p.OfficeUID;
            PersonnelUID = p.PersonnelUID;
            Price = p.Price;
            CreateTime = p.CreateTime;
        }
    }
}
